package com.kede.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import java.io.Serializable;
import java.util.LinkedList;
import java.util.List;

/**
 * <p>
 * 
 * </p>
 *
 * @author 【请填写作者】
 * @since 2020-03-27
 */
public class Menu implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 主键ID
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 菜单名称
     */
    private String title;

    /**
     * 父级编号
     */
    private Long pid;

    /**
     * 所有父级编号
     */
    private String pids;

    /**
     * URL地址
     */
    private String url;

    /**
     * 权限标识
     */
    private String perms;

    /**
     * 类型（1:一级菜单,2:子级菜单,3:不是菜单）
     */
    private Integer type;

    /**
     * 备注
     */
    private String remark;

    /**
     * 创建时间
     */
    private LocalDateTime createDate;

    public List<Menu> getChild() {
        return child;
    }

    public void setChild(List<Menu> child) {
        this.child = child;
    }

    /**
     * 状态（1:正常,2:冻结,3:删除）
     */
    private Integer status;
    /**
     * 子菜单
     */
    @TableField(exist = false)
    private List<Menu> child=new LinkedList<>();

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }
    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }
    public Long getPid() {
        return pid;
    }

    public void setPid(Long pid) {
        this.pid = pid;
    }
    public String getPids() {
        return pids;
    }

    public void setPids(String pids) {
        this.pids = pids;
    }
    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }
    public String getPerms() {
        return perms;
    }

    public void setPerms(String perms) {
        this.perms = perms;
    }
    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }
    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }
    public LocalDateTime getCreateDate() {
        return createDate;
    }

    public void setCreateDate(LocalDateTime createDate) {
        this.createDate = createDate;
    }
    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    @Override
    public String toString() {
        return "Menu{" +
            "id=" + id +
            ", title=" + title +
            ", pid=" + pid +
            ", pids=" + pids +
            ", url=" + url +
            ", perms=" + perms +
            ", type=" + type +
            ", remark=" + remark +
            ", createDate=" + createDate +
            ", status=" + status +
        "}";
    }
}
